package com.xiyou.luckdraw.api.dto.answer;

import com.xiyou.luckdraw.common.result.AbstractRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @ClassName: AnswerBankListRequest
 * @Description:
 * @author: limingxing
 * @Date: 2019-10-09 15:40
 */
@Data
@ApiModel("答题库列表请求")
public class AnswerBankListRequest extends AbstractRequest {
    @ApiModelProperty(value="题目")
    private String answerTitle;
    private Long level;
    @ApiModelProperty(value="题目状态 1:启用,2：弃用",example = "1")
    private Long status;
    @ApiModelProperty(value = "页码",example = "1")
    private Integer page;
    @ApiModelProperty(value = "页大小",example = "10")
    private Integer size;
    @ApiModelProperty(value="开始时间")
    private String startTime;
    @ApiModelProperty(value="结束时间")
    private String endTime;


    @Override
    public void requestCheck() {
        if(page == null || page < 1){
            page = 1;
        }
        if(size == null || size < 1){
            size = 10;
        }

    }
}
